package com.wushi.lenovo.asia5b.app_http;

import com.mvp.base.model.ResultModel;
import com.mvp.common.GlobalValue;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by zhangyuncai on 2019/1/31.
 * 订单中点击事件
 */
public interface OrderActionService {

    /**
     * "button_cancel_order" => {'en' : 'Cancel', 'cn' : '取消订单'}
     * member_id	integer	Id of the specified member
     * id	integer	Parcel id
     * parcel_status	integer	Parcel status (Default: 0)
     * cancel_status	integer	Cancel status ID (Referral Get Cancel Status API)
     * reason	varchar	If cancel status id = 3 Is required
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST(GlobalValue.Base_Version_Url + "orderdg.detail.cancel")
    Observable<ResultModel> button_cancel_order(@FieldMap Map<String, Object> map
    );

    /**
     * "button_ng_accept" => {'en' : 'Accept', 'cn' : '接受'}
     * member_id	integer	Id of the specified member
     * order_detail_id	integer	Parcel id
     * ng_details_id	integer	NG Details ID
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST(GlobalValue.Base_Version_Url + "orderdg.detail.accept.ngitem")
    Observable<ResultModel> button_ng_accept(@FieldMap Map<String, Object> map
    );

    /**
     * "button_ng_request_exchange" => {'en' : 'Exchange', 'cn' : '换货'}
     * member_id	integer	Id of the specified member
     * order_detail_id	integer	Parcel id
     * ng_details_id	integer	NG Details ID
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST(GlobalValue.Base_Version_Url + "orderdg.detail.request.exchange.ngitem")
    Observable<ResultModel> button_ng_request_exchange(@FieldMap Map<String, Object> map
    );

    /**
     * "button_ng_request_refund" => {'en' : 'Refund', 'cn' : '退款'} //
     * member_id	integer	Id of the specified member
     * order_detail_id	integer	Parcel id
     * ng_details_id	integer	NG Details ID
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST(GlobalValue.Base_Version_Url + "orderdg.detail.request.refund.ngitem")
    Observable<ResultModel> button_ng_request_refund(@FieldMap Map<String, Object> map
    );

    /**
     * "button_ng_confirm_exchange" => {'en' : 'Exchange', 'cn' : '换货'}
     * member_id	integer	Id of the specified member
     * order_detail_id	integer	Parcel id
     * ng_details_id	integer	NG Details ID
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST(GlobalValue.Base_Version_Url + "orderdg.detail.confirm.exchange.ngitem")
    Observable<ResultModel> button_ng_confirm_exchange(@FieldMap Map<String, Object> map
    );

    /**
     * "button_ng_confirm_refund" => {'en' : 'Refund', 'cn' : '退款'}
     * member_id	integer	Id of the specified member
     * order_detail_id	integer	Parcel id
     * ng_details_id	integer	NG Details ID
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST(GlobalValue.Base_Version_Url + "orderdg.detail.confirm.refund.ngitem")
    Observable<ResultModel> button_ng_confirm_refund(@FieldMap Map<String, Object> map
    );

    /**
     * "button_reverify" => {'en' : 'Reverify', 'cn' : '重新审核'}
     * member_id	integer	Id of the specified member
     * id	integer	Parcel id
     * order_id	integer	Order ID
     */
    @FormUrlEncoded
    @POST(GlobalValue.Base_Version_Url + "orderdg.detail.reverify")
    Observable<ResultModel> button_reverify(@FieldMap Map<String, Object> map
    );

    /**
     * "button_received" => {'en' : 'Receive', 'cn' : '已收货'}
     * <p>
     * member_id	integer	Id of the specified member
     * id	integer	Parcel id
     * order_id	integer	Order ID
     *
     * @return
     */
    @FormUrlEncoded
    @POST(GlobalValue.Base_Version_Url + "orderdg.detail.received")
    Observable<ResultModel> button_received(@FieldMap Map<String, Object> map
    );
    //"button_return" => {'en' : 'Return', 'cn' : '申请退货'} //暂时没用到，不过按键code是不会改变的
    //@FormUrlEncoded
//    @POST(GlobalValue.Base_Version_Url + "orderdg.detail.cancel")
//    Observable<ResultModel> button_return(@FieldMap Map<String, Object> map
//    );

}
